var CryptoJS = require("crypto-js");

const info = 'message'

// 加密
var ciphertext = CryptoJS.AES.encrypt(info, 'secret key 123').toString();
console.log(ciphertext)

// 解密
var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
var originalText = bytes.toString(CryptoJS.enc.Utf8);
console.log(originalText)